package admintool.imp03_ui_components;

import javax.swing.*;
import javax.swing.event.*;

/**
 * 
 * @author Administrator
 */
public class MyListModel implements ListModel {
  private MyCollection collection;
  
  /**
   * 
   * @param collection
   */
  public MyListModel(MyCollection collection) {
    this.collection = collection;
  }

  /**
   * 
   * @return
   */
  public MyCollection getMyCollection() {
    return collection;
  }

  public Object getElementAt(int index) {
    return(collection.getObjects()[index]);
  }

  public int getSize() {
    return(collection.getObjects().length);
  }

  public void addListDataListener(ListDataListener l) {}

  public void removeListDataListener(ListDataListener l) {}
}